\(\int \frac {\tan ^2(x)}{(a+a \tan ^2(x))^{3/2}} \, dx\) [279]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [B] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 17, antiderivative size = 23 \[ \int \frac {\tan ^2(x)}{\left (a+a \tan ^2(x)\right )^{3/2}} \, dx=\frac {\sin ^2(x) \tan (x)}{3 a \sqrt {a \sec ^2(x)}} \]

[Out]

1/3*sin(x)^2*tan(x)/a/(a*sec(x)^2)^(1/2)

Rubi [A] (verified)

Time = 0.13 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.235, Rules used = {3738, 4210, 2644, 30} \[ \int \frac {\tan ^2(x)}{\left (a+a \tan ^2(x)\right )^{3/2}} \, dx=\frac {\sin ^2(x) \tan (x)}{3 a \sqrt {a \sec ^2(x)}} \]

[In]

Int[Tan[x]^2/(a + a*Tan[x]^2)^(3/2),x]

[Out]

(Sin[x]^2*Tan[x])/(3*a*Sqrt[a*Sec[x]^2])

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2644

Int[cos[(e_.) + (f_.)*(x_)]^(n_.)*((a_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Dist[1/(a*f), Subst[Int[
x^m*(1 - x^2/a^2)^((n - 1)/2), x], x, a*Sin[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n - 1)/2] &&
 !(IntegerQ[(m - 1)/2] && LtQ[0, m, n])

Rule 3738

Int[(u_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Int[ActivateTrig[u*(a*sec[e + f*x]^2)^p]
, x] /; FreeQ[{a, b, e, f, p}, x] && EqQ[a, b]

Rule 4210

Int[(u_.)*((b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_), x_Symbol] :> With[{ff = FreeFactors[Sec[e + f*x], x]}, Di
st[(b*ff^n)^IntPart[p]*((b*Sec[e + f*x]^n)^FracPart[p]/(Sec[e + f*x]/ff)^(n*FracPart[p])), Int[ActivateTrig[u]
*(Sec[e + f*x]/ff)^(n*p), x], x]] /; FreeQ[{b, e, f, n, p}, x] &&  !IntegerQ[p] && IntegerQ[n] && (EqQ[u, 1] |
| MatchQ[u, ((d_.)*(trig_)[e + f*x])^(m_.) /; FreeQ[{d, m}, x] && MemberQ[{sin, cos, tan, cot, sec, csc}, trig
]])

Rubi steps \begin{align*} \text {integral}& = \int \frac {\tan ^2(x)}{\left (a \sec ^2(x)\right )^{3/2}} \, dx \\ & = \frac {\sec (x) \int \cos (x) \sin ^2(x) \, dx}{a \sqrt {a \sec ^2(x)}} \\ & = \frac {\sec (x) \text {Subst}\left (\int x^2 \, dx,x,\sin (x)\right )}{a \sqrt {a \sec ^2(x)}} \\ & = \frac {\sin ^2(x) \tan (x)}{3 a \sqrt {a \sec ^2(x)}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.78 \[ \int \frac {\tan ^2(x)}{\left (a+a \tan ^2(x)\right )^{3/2}} \, dx=\frac {\tan ^3(x)}{3 \left (a \sec ^2(x)\right )^{3/2}} \]

[In]

Integrate[Tan[x]^2/(a + a*Tan[x]^2)^(3/2),x]

[Out]

Tan[x]^3/(3*(a*Sec[x]^2)^(3/2))

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(55\) vs. \(2(19)=38\).

Time = 0.05 (sec) , antiderivative size = 56, normalized size of antiderivative = 2.43

method result size
derivativedivides \(\frac {\tan \left (x \right )}{a \sqrt {a +a \tan \left (x \right )^{2}}}-a \left (\frac {\tan \left (x \right )}{3 a \left (a +a \tan \left (x \right )^{2}\right )^{\frac {3}{2}}}+\frac {2 \tan \left (x \right )}{3 a^{2} \sqrt {a +a \tan \left (x \right )^{2}}}\right )\) \(56\)
default \(\frac {\tan \left (x \right )}{a \sqrt {a +a \tan \left (x \right )^{2}}}-a \left (\frac {\tan \left (x \right )}{3 a \left (a +a \tan \left (x \right )^{2}\right )^{\frac {3}{2}}}+\frac {2 \tan \left (x \right )}{3 a^{2} \sqrt {a +a \tan \left (x \right )^{2}}}\right )\) \(56\)
risch \(\frac {i {\mathrm e}^{4 i x}}{24 a \left ({\mathrm e}^{2 i x}+1\right ) \sqrt {\frac {a \,{\mathrm e}^{2 i x}}{\left ({\mathrm e}^{2 i x}+1\right )^{2}}}}-\frac {i {\mathrm e}^{2 i x}}{8 a \left ({\mathrm e}^{2 i x}+1\right ) \sqrt {\frac {a \,{\mathrm e}^{2 i x}}{\left ({\mathrm e}^{2 i x}+1\right )^{2}}}}+\frac {i}{8 a \left ({\mathrm e}^{2 i x}+1\right ) \sqrt {\frac {a \,{\mathrm e}^{2 i x}}{\left ({\mathrm e}^{2 i x}+1\right )^{2}}}}-\frac {i {\mathrm e}^{-2 i x}}{24 a \left ({\mathrm e}^{2 i x}+1\right ) \sqrt {\frac {a \,{\mathrm e}^{2 i x}}{\left ({\mathrm e}^{2 i x}+1\right )^{2}}}}\) \(149\)

[In]

int(tan(x)^2/(a+a*tan(x)^2)^(3/2),x,method=_RETURNVERBOSE)

[Out]

1/a*tan(x)/(a+a*tan(x)^2)^(1/2)-a*(1/3/a*tan(x)/(a+a*tan(x)^2)^(3/2)+2/3/a^2*tan(x)/(a+a*tan(x)^2)^(1/2))

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 39 vs. \(2 (19) = 38\).

Time = 0.27 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.70 \[ \int \frac {\tan ^2(x)}{\left (a+a \tan ^2(x)\right )^{3/2}} \, dx=\frac {\sqrt {a \tan \left (x\right )^{2} + a} \tan \left (x\right )^{3}}{3 \, {\left (a^{2} \tan \left (x\right )^{4} + 2 \, a^{2} \tan \left (x\right )^{2} + a^{2}\right )}} \]

[In]

integrate(tan(x)^2/(a+a*tan(x)^2)^(3/2),x, algorithm="fricas")

[Out]

1/3*sqrt(a*tan(x)^2 + a)*tan(x)^3/(a^2*tan(x)^4 + 2*a^2*tan(x)^2 + a^2)

Sympy [F]

\[ \int \frac {\tan ^2(x)}{\left (a+a \tan ^2(x)\right )^{3/2}} \, dx=\int \frac {\tan ^{2}{\left (x \right )}}{\left (a \left (\tan ^{2}{\left (x \right )} + 1\right )\right )^{\frac {3}{2}}}\, dx \]

[In]

integrate(tan(x)**2/(a+a*tan(x)**2)**(3/2),x)

[Out]

Integral(tan(x)**2/(a*(tan(x)**2 + 1))**(3/2), x)

Maxima [A] (verification not implemented)

none

Time = 0.39 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.61 \[ \int \frac {\tan ^2(x)}{\left (a+a \tan ^2(x)\right )^{3/2}} \, dx=-\frac {\sin \left (3 \, x\right ) - 3 \, \sin \left (x\right )}{12 \, a^{\frac {3}{2}}} \]

[In]

integrate(tan(x)^2/(a+a*tan(x)^2)^(3/2),x, algorithm="maxima")

[Out]

-1/12*(sin(3*x) - 3*sin(x))/a^(3/2)

Giac [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.70 \[ \int \frac {\tan ^2(x)}{\left (a+a \tan ^2(x)\right )^{3/2}} \, dx=\frac {\tan \left (x\right )^{3}}{3 \, {\left (a \tan \left (x\right )^{2} + a\right )}^{\frac {3}{2}}} \]

[In]

integrate(tan(x)^2/(a+a*tan(x)^2)^(3/2),x, algorithm="giac")

[Out]

1/3*tan(x)^3/(a*tan(x)^2 + a)^(3/2)

Mupad [B] (verification not implemented)

Time = 11.61 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.22 \[ \int \frac {\tan ^2(x)}{\left (a+a \tan ^2(x)\right )^{3/2}} \, dx=\frac {{\mathrm {tan}\left (x\right )}^3}{\left (3\,a\,{\mathrm {tan}\left (x\right )}^2+3\,a\right )\,\sqrt {a\,{\mathrm {tan}\left (x\right )}^2+a}} \]

[In]

int(tan(x)^2/(a + a*tan(x)^2)^(3/2),x)

[Out]

tan(x)^3/((3*a + 3*a*tan(x)^2)*(a + a*tan(x)^2)^(1/2))